package com.ruoyi.smartai.entity;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * 访问相似会话步骤实体
 */
public class SimilarityRequest implements Serializable {
    private static final long serialVersionUID = 1L;

    // 定义为匹配项列表
    private List<MatchingItem> matching_data = new ArrayList<>();

    /**
     * 用户回复的内容
     */
    private String combined_messages;

    private float threshold = 0.6f;


    public void addMatchingItem(MatchingItem item) {
        matching_data.add(item);
    }

    public void addMatchingItem(String answer, String id, String next_id) {
        MatchingItem item = new MatchingItem(answer, id, next_id);
        matching_data.add(item);
    }

    public List<MatchingItem> getMatching_data() {
        return matching_data;
    }

    public void setMatching_data(List<MatchingItem> matching_data) {
        this.matching_data = matching_data;
    }

    public String getCombined_messages() {
        return combined_messages;
    }

    public void setCombined_messages(String combined_messages) {
        this.combined_messages = combined_messages;
    }

    public float getThreshold() {
        return threshold;
    }

    public void setThreshold(float threshold) {
        this.threshold = threshold;
    }

    /**
     * 匹配数据项类
     */
    public static class MatchingItem implements Serializable {
        private static final long serialVersionUID = 1L;

        private String answer;
        private String id;
        private String next_id;

        public MatchingItem(String answer, String id, String next_id) {
            this.answer = answer;
            this.id = id;
            this.next_id = next_id;
        }

        public MatchingItem() {
        }

        public String getAnswer() {
            return answer;
        }

        public void setAnswer(String answer) {
            this.answer = answer;
        }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getNext_id() {
            return next_id;
        }

        public void setNext_id(String next_id) {
            this.next_id = next_id;
        }
    }
}
